/* fancy colored logs. An overlayer of node console IO */


/* adds color to the basic console.log function. 
 * must defines origin of the log message.
 */
function colorInfo(from, log) {
	console.log('\033[0;37m' + '[' + from + '] ' + log + '\033[0m');
}

/* adds color to the basic console.err function.
 * must defines origin of the log message.
 */
function colorErr(from, err) {
	console.error('\033[31m' + '[' + from + '] ERROR : ' + err + '\033[0m');
}

/* adds color to the basic console.warn function.
 * must defines origin of the log message.
 */
function colorWarn(from, warn) {
	console.warn('\033[33m' + '[' + from + '] WARNING : ' + warn + '\033[0m');
}

module.exports.info = colorInfo;
module.exports.err = colorErr;
module.exports.warn = colorWarn;
